﻿@model IEnumerable<RetailManagement.Models.list_voucher>
@if (Model != null)
{
foreach (var item in Model)
{
    if (item.Hot == true)
    {
        <div class="content">
            <div id="column4">
                <img src="@Html.DisplayFor(modelitem => item.Image)" width="720" height="380" alt="" />
            </div>
            <div class="column9">
                <h3>
                <a href="Voucher/Details_Voucher/@item.Product_ID">@Html.DisplayFor(modelitem => item.Product_Name)</a></h3>
                <p>
                        @if (item.Delivery == "Giao sản phẩm")
                        {
                            <img src="../../Content/sovereign/images/delivery_icon.png" width="30" height="20" alt="" style="margin-left:10px" />
                            <a1>(@Html.DisplayFor(modelitem => item.Delivery))</a1>
                        }
                        else
                        { 
                            <img src="../../Content/sovereign/images/icon_voucher.png" width="30" height="20" alt="" style="margin-left:10px" />
                            <a1>(@Html.DisplayFor(modelitem => item.Delivery))</a1>
                        }
                    </p>
                <div class ="column10">
                @if (!String.IsNullOrEmpty(item.Details))
                {
                    @(item.Details.Length > 100 ? item.Details.ToString().Substring(0, 150) : item.Details.ToString()); <a1>.....</a1> 
                }
                </div>
                
                <div>
                        <p>
                        <div class="column7">
                            <a3>@String.Format("{0:0,0}đ", (item.Price - (item.Price * (Convert.ToDecimal(item.Sale) / 100))))</a3><br />
                            <a4><del>Giá gốc: @String.Format("{0:0,0}đ", (item.Price))</del></a4>
                        </div>
                        <div class="column7">
                            <a href="Voucher/Details_Voucher/@item.Product_ID"><img src="../../Content/sovereign/images/btn_buy.png" width="100" height="51" alt=""  /></a>
                        </div>
                        </p>
                </div>
                <div>
                        <div class="column8"><a4>Giảm</a4><br /> <a2>@Html.DisplayFor(modelitem => item.Sale)%</a2></div>
                        <div class="column8"><a4>TG Còn lại</a4><br /> <a2>12:12:12</a2></div>
                        <div class="column8"><a4>Số người mua</a4><br /><a2>@Html.DisplayFor(modelitem => item.Quantity)</a2></div>
                </div>
            </div>
        </div>
    }
}
}